﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using RN.ERP.Web.ModelService;
using Newtonsoft.Json;

namespace RN.ERP.Web.Utilities
{
    public class BaseUserControl : System.Web.UI.UserControl
    {
        #region Session数据

        protected SessionUserInfo UserInfo
        {
            get
            {
                if (Session[SessionConstant.SESSION_USERINFO] == null)
                {
                  //  RebuildSessionUserInfo();
                    UtilitiesTool.RebuildSessionUserInfo();
                }
                return Session[SessionConstant.SESSION_USERINFO] == null ? null : (SessionUserInfo)Session[SessionConstant.SESSION_USERINFO];
            }
        }

        #endregion

        protected string SystemID
        {
            get
            {
                if (System.Configuration.ConfigurationManager.AppSettings["AppId"] != null)
                {
                    return System.Configuration.ConfigurationManager.AppSettings["AppId"];
                }
                return "0";
            }
        }
        public BaseUserControl()
        {
            //
            // TODO: Add constructor logic here
            //
        }
    }
}